From e2742d3d24c3c2936423bd56e634ed658872c4ad Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 3 Apr 2001 16:02:35 +0000 Subject: [PATCH] (mh-folder-hist): New var. (mh-prompt-for-folder): Use it and pass `default' to completing-read. --- lisp/mail/mh-utils.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/mail/mh-utils.el b/lisp/mail/mh-utils.el index 30605bb9311..c71e51656df 100644 --- a/lisp/mail/mh-utils.el +++ b/lisp/mail/mh-utils.el @@ -725,6 +725,7 @@ directory names." (setq mode-name mode-name-string) (force-mode-line-update t)) +(defvar mh-folder-hist nil) (defun mh-prompt-for-folder (prompt default can-create) ;; Prompt for a folder name with PROMPT. Returns the folder's name as a @@ -739,8 +740,8 @@ directory names." read-name folder-name) (if (null mh-folder-list) (mh-set-folder-list)) - (while (and (setq read-name (completing-read prompt mh-folder-list - nil nil "+")) + (while (and (setq read-name (completing-read prompt mh-folder-list nil nil + "+" 'mh-folder-hist default)) (equal read-name "") (equal default ""))) (cond ((or (equal read-name "") (equal read-name "+")) -- 2.30.2